<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {   //购物表
        Schema::create('shops', function (Blueprint $table) {
            $table->increments('shop_id');
            $table->integer('uid')->comment('用户id');
            $table->string('goods_name')->comment('商品名称');
            $table->integer('shop_state')->comment('商品状态:0购物车1已购买2已发货3已收货4退货5交易完成');
            $table->integer('cat_id')->comment('栏目id');
            $table->integer('brand_id')->comment('品牌id');
            $table->string('goods_sn')->comment('货号');
            $table->integer('goods_number')->comment('商品数量');
            $table->integer('shop_price')->comment('现价');
            $table->integer('market_price')->comment('市场价');
            $table->dateTime('inputtime')->comment('发布时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
       Schema::drop('shops');
    }
}
